package com.zhiche.lisa.bms.pojo.vo.quote;

import com.zhiche.lisa.bms.dao.model.contract.ContractFinalpay;
import com.zhiche.lisa.bms.dao.model.quote.Quote;
import org.springframework.util.CollectionUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: liuanshun
 * @Description:
 * @Date: Create in 15:22 2018/10/28
 */
public class QuoteAndContractVO extends Quote {
    private BigDecimal oilPrepayRate;
    private BigDecimal oilFinalpayRate;
    private BigDecimal cashPrepayRate;
    private BigDecimal cashFinalpayRate;
    private BigDecimal cashDeposit;
    private List<ContractFinalpay> contractFinalpays;

    public BigDecimal getOilPrepayRate() {
        return oilPrepayRate;
    }

    public void setOilPrepayRate(BigDecimal oilPrepayRate) {
        this.oilPrepayRate = oilPrepayRate;
    }

    public BigDecimal getOilFinalpayRate() {
        return oilFinalpayRate;
    }

    public void setOilFinalpayRate(BigDecimal oilFinalpayRate) {
        this.oilFinalpayRate = oilFinalpayRate;
    }

    public BigDecimal getCashPrepayRate() {
        return cashPrepayRate;
    }

    public void setCashPrepayRate(BigDecimal cashPrepayRate) {
        this.cashPrepayRate = cashPrepayRate;
    }

    public BigDecimal getCashFinalpayRate() {
        return cashFinalpayRate;
    }

    public void setCashFinalpayRate(BigDecimal cashFinalpayRate) {
        this.cashFinalpayRate = cashFinalpayRate;
    }

    public List<ContractFinalpay> getContractFinalpays() {
        return contractFinalpays;
    }

    public void setContractFinalpays(List<ContractFinalpay> contractFinalpays) {
        this.contractFinalpays = contractFinalpays;
    }

    public void addContractFinalpays(ContractFinalpay contractFinalpay) {
        if (CollectionUtils.isEmpty(this.contractFinalpays)) {
            this.contractFinalpays = new ArrayList<>();
        }
        this.contractFinalpays.add(contractFinalpay);
    }

    public BigDecimal getCashDeposit() {
        return cashDeposit;
    }

    public void setCashDeposit(BigDecimal cashDeposit) {
        this.cashDeposit = cashDeposit;
    }

}